/*
 * @Author       : xh
 * @Date         : 2022-10-11 10:20:18
 * @LastEditors: y001554
 * @FileName     :
 */
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx' // 新增
import { defineConfig } from 'vite'
import VueDevTools from 'vite-plugin-vue-devtools'
import DefineOptions from 'unplugin-vue-define-options/vite'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    VueDevTools(),
    vue({
      template: {
        compilerOptions: {
          // treat all tags with a dash as custom elements
          // isCustomElement: (tag) => tag.includes('el-')
        }
      }
    }),
    vueJsx(),
    DefineOptions()
  ],
  resolve: {
    alias: {
      '@': '/src',
      '@@': '/packages',
      $: '/build'
    },
    extensions: ['.ts', '.js', '.vue', '.json']
  }
})
